Contents
About the Authors
xi
1
Introduction
1
1.1
Principal Methods
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.1.1
Early Binary Neural Networks
. . . . . . . . . . . . . . . . . . . . .
2
1.1.2
Gradient Approximation . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.1.3
Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.1.4
Structural Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.1.5
Loss Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.1.6
Neural Architecture Search . . . . . . . . . . . . . . . . . . . . . . .
10
1.1.7
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
1.2
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
1.2.1
Image Classification
. . . . . . . . . . . . . . . . . . . . . . . . . . .
13
1.2.2
Speech Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
1.2.3
Object Detection and Tracking . . . . . . . . . . . . . . . . . . . . .
13
1.2.4
Applications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
1.3
Our Works on BNNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2
Quantization of Neural Networks
16
2.1
Overview of Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.1.1
Uniform and Non-Uniform Quantization . . . . . . . . . . . . . . . .
16
2.1.2
Symmetric and Asymmetric Quantization . . . . . . . . . . . . . . .
17
2.2
LSQ: Learned Step Size Quantization
. . . . . . . . . . . . . . . . . . . . .
18
2.2.1
Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
2.2.2
Step Size Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.2.3
Step Size Gradient Scale . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.2.4
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.3
Q-ViT: Accurate and Fully Quantized Low-Bit Vision Transformer . . . . .
21
2.3.1
Baseline of Fully Quantized ViT
. . . . . . . . . . . . . . . . . . . .
22
2.3.2
Performance Degeneration of Fully Quantized ViT Baseline . . . . .
23
2.3.3
Information Rectification in Q-Attention . . . . . . . . . . . . . . . .
24
2.3.4
Distribution Guided Distillation Through Attention
. . . . . . . . .
26
2.3.5
Ablation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
2.4
Q-DETR: An Efficient Low-Bit Quantized Detection Transformer . . . . . .
28
2.4.1
Quantized DETR Baseline . . . . . . . . . . . . . . . . . . . . . . . .
30
2.4.2
Challenge Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
2.4.3
Information Bottleneck of Q-DETR
. . . . . . . . . . . . . . . . . .
32
2.4.4
Distribution Rectification Distillation
. . . . . . . . . . . . . . . . .
33
2.4.5
Ablation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
vii